﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DBUtility;

public partial class Manageweb_Control_LeftWebInfo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string SQLstr = "SELECT * FROM [WebInfo]";

        DataTable DT = AccHelper.GetDataTable(SQLstr);

        foreach (DataRow dr in DT.Rows)
        {
            TreeNode tn = new TreeNode(
                dr["WI_Title"].ToString(),
                dr["WI_ID"].ToString());

            tn.Target = "mainFrame";

            tn.NavigateUrl = "~/Manageweb/ManageInfo.aspx?WebInfoID=" + dr["WI_ID"].ToString();

            TV_WebInfo.Nodes[0].ChildNodes.Add(tn);
        }
    }
}
